<%@ page import="com.zs.entity.Admin" %>
<%@ page import="com.zs.dao.AdminDao" %><%--
  Created by IntelliJ IDEA.
  User: chongge
  Date: 2024/1/11
  Time: 10:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        String aname = request.getParameter("aname");
        String apwd = request.getParameter("apwd");
        AdminDao adminDao = new AdminDao();
        Admin admin =  adminDao.adminlogin(aname,apwd);
        if (admin!=null){
            //将管理员对象存入session会话(打开浏览器到关闭这段时间)
            session.setAttribute("admin",admin);
            response.sendRedirect("main.jsp");
        }
    %>
</body>
</html>
